import java.util.Scanner;

public class OnlyOneWord {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int n = scan.nextInt();
        int[] cnt = new int[10];
        int[] arr = new int[n];
        for(int i = 0; i < n; i++){
            arr[i] = scan.nextInt();
            cnt[arr[i]]++;
        }

        for(int i = 0; i < arr.length; i++){
            if(cnt[arr[i]] == 1){
                System.out.println(arr[i]);
                break;
            }
        }

    }
}
